home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / UTIL / KEYBOARD / FASTTASK / !FastTask / Docs / TaskEnsure < prev    next >
Text File  |  1994-03-31  |  3KB  |  116 lines

  1. TaskEnsure v0.00
  2. © Ben Summers 1993
  3.  
  4.  
  5. TaskEnsure will only work properly under RISC OS 3.
  6.  
  7.  
  8. What?
  9. ~~~~~
  10. I'm sure you will all realise how useful the RMensure command is when you
  11. want to load a module, but only if it's not already loaded. The TaskEnsure
  12. utility allows you to do the same with a WIMP task.
  13.  
  14. I've set up my computer using various desktop boot files to set up an
  15. environment for various tasks, for example loading printer drivers,
  16. Impression and Draw and opening a few directories for document processing.
  17.  
  18. Now, using this utility, I can check to see if an application is already
  19. present before loading it so I don't get multiple copies of applications if
  20. I run the desktop boot file again, or want to run another one for doing two
  21. or more things at once.
  22.  
  23. This utility will only work under RISC OS 3. Under OS2, it'll assume that
  24. the task is not present. This is because it uses calls new to OS3.
  25.  
  26.  
  27. How?
  28. ~~~~
  29. You have a choice on how to use TaskEnsure. Firstly, you could copy the
  30. TaskEnsure file into your Library directory, or you could load the
  31. TaskEnsurM module. The first option is probably best for hard disc users.
  32. I've provided it as a module and an executable file so that you can make the
  33. choice.
  34.  
  35. Either way, the effect will be to add another *command to the vast
  36. repertoire your computer already has. The syntax is
  37.  
  38. TaskEnsure [-p] <task name> <*command>
  39.  
  40. The task name is the name of the task to check for. Matching is case
  41. sensitive. If the task name includes spaces, enclose the task name in "s.
  42.  
  43. If the task is not present, the *command is executed. This may include
  44. spaces without quotes... simply, the rest of the line is sent to the CLI.
  45.  
  46. If the -p options is included (it's position is important), the sense of the
  47. command is reversed, and the command is executed if the task IS present. I
  48. wish RMensure had this facility!
  49.  
  50.  
  51. Examples
  52. ~~~~~~~~
  53. To load Draw it it's not already present.
  54.  
  55. TaskEnsure Draw Filer_Run resources:$.Apps.!Draw
  56.  
  57.  
  58. To load a printer driver if draw is present.
  59.  
  60. TaskEnsure -p Draw TaskEnsure "Printer Manager" Filer_Run ADFS::Ben.$
  61.                                              .Document.Printers.!Printers
  62.  
  63. note: this command should be all on one line.
  64.  
  65. This last example illustrates three points. Firstly that the -p option is
  66. actually useful, and secondly the 'double' TaskEnsure command. The first
  67. TaskEnsure sees if Draw is present, the second only loads Printers is it is
  68. not already loaded. Thirdly, the task name of Printers has a space in it and
  69. so is enclosed in quotes.
  70.  
  71.  
  72. Source code
  73. ~~~~~~~~~~~
  74. The source code of TaskEnsure is included in this distribution. TaskEnsure
  75. is written in ARM code, and is assembled by the Acorn Assembler (not the
  76. BASIC one).
  77.  
  78. Please do not distribute modified versions of this source code.
  79.  
  80.  
  81. Distribution
  82. ~~~~~~~~~~~~
  83. I retain copyright on all executable code, source code and documentation.
  84. However, you may distribute it free of charge as long as it is UNMODIFIED.
  85. Reasonable charges for media and distribution are acceptable.
  86.  
  87.  
  88. The author
  89. ~~~~~~~~~~
  90. TaskEnsure was written by Ben Summers. You can contact me at the address
  91. below. Enclose an SAE if you want a reply.
  92.  
  93. If you send a disc, I'll copy the latest versions of all my PD programs onto
  94. it before sending it back.
  95.  
  96.   Ben Summers
  97.   1 St Clements Hill
  98.   Norwich
  99.   NR3 4DE
  100.  
  101.   email: bsummers@cix.compulink.co.uk
  102.  
  103.  
  104.  
  105. Use and enjoy!
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.